# 定义一个商品类
class Goods:
    def __init__(self):
        self.name = "商品"

    def fn(self):
        print("商品类物品")

    def __str__(self):
        return f"{self.name}"

# 定义一个手机类
class Phone(Goods):
    # def __init__(self):
    #     self.name = "手机"

    def fn(self):
        print("手机类")

phone =Phone()
print(phone)
phone.fn()

